package cn.iocoder.yudao.module.erp.controller.admin.product.vo.product;

import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - ERP 产品新增/修改 Request VO")
@Data
public class ProductSaveReqVO {

    @Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "15672")
    private Long id;

    @Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
    @NotEmpty(message = "产品名称不能为空")
    private String name;

    @Schema(description = "全拼音（大写）")
    private String fullPinyin;

    @Schema(description = "拼音首字母（大写）")
    private String firstPinyin;

    @Schema(description = "五笔简码（大写）")
    private String wubiShortcode;

    @Schema(description = "产品条码", requiredMode = Schema.RequiredMode.REQUIRED, example = "X110")
    @NotEmpty(message = "产品条码不能为空")
    private String barCode;

    @Schema(description = "产品分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "11161")
    @NotNull(message = "产品分类编号不能为空")
    private Long categoryId;

    @Schema(description = "单位编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "8869")
    @NotNull(message = "单位编号不能为空")
    private Long unitId;

    @Schema(description = "生产厂家")
    private String manufacturer;


    @Schema(description = "是否收费")
    private Long isFree;

    @Schema(description = "是否专机专用")
    private Long isDedicated;

    @Schema(description = "注册证号")
    private String registCertNum;

    @Schema(description = "医保27位编码")
    private String medicalInsurCode;

    @Schema(description = "产品状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "产品状态不能为空")
    private Integer status;
//
//    @Schema(description = "批次", requiredMode = Schema.RequiredMode.REQUIRED)
//    @NotEmpty(message = "批次不能为空")
//    private String batch;

    @Schema(description = "产品规格", example = "红色")
    private String standard;

    @Schema(description = "产品备注", example = "你猜")
    private String remark;

//    @Schema(description = "有效期", requiredMode = Schema.RequiredMode.REQUIRED)
//    @NotNull(message = "有效期不能为空")
//    private LocalDateTime validityDate;

    @Schema(description = "基础重量（kg）", example = "1.00")
    private BigDecimal weight;

    @Schema(description = "采购价格，单位：元", example = "10.30")
    private BigDecimal purchasePrice;

    @Schema(description = "销售价格，单位：元", example = "74.32")
    private BigDecimal salePrice;

    @Schema(description = "最低价格，单位：元", example = "161.87")
    private BigDecimal minPrice;

    @Schema(description = "是否帶量", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty("是否帶量")
    private Integer isQuantity;
    @Schema(description = "单位名称")
    private String unitName;
    @Schema(description = "分类名称")
    private String categoryName;

    private Long dataId;


    @Schema(description = "生效日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "生效日期不能为空")
    private LocalDateTime startTime;

    @Schema(description = "截止日期", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime endTime;

    private Long supplierId;

}